﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

	<head>
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />			
		<meta name="description" content="Democracia 2.0" />
		<meta name="keywords" content="Democracia 2.0"  />
		<meta name="Language" content="pt" />
		<meta name="Robots" content="All" />
		<link rel="stylesheet" type="text/css" href="/css/main.css" media="screen" />		
		
		<!--[if lte IE 6]>
			<link rel="stylesheet" type="text/css" href="/css/ie6.css" media="screen" />
			<script type="text/javascript">
				if (typeof blankImg == 'undefined') var blankImg = '/templates/yget/images/blank.gif';
			</script>
			<style type="text/css" media="screen">
				body {behavior:url(/css/iehfix.htc); }
				img {behavior:url(/css/iepngfix.htc); }
			</style>	
		<![endif]-->
		
		<!-- Load the Google AJAX API Loader -->
		<script type="text/javascript" src="http://www.google.com/jsapi"></script>
		<!-- Load the Google Friend Connect javascript library. -->
		<script type="text/javascript">
			google.load('friendconnect', '0.8');
			google.load("jquery", "1");
		</script>
		<title>{{resource.title}}</title>
		<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.democracia2.com/rss"/>
		<link rel="icon" href="/favicon.ico" type="image/x-icon"/>	
	</head>

	<body>	
		<div id="wrap">		
			<div id="header">				
			<ul class="search2">
				<li>			
					<form action="/search" method="get" name="thisform-search" id="thisform-search">
						<input type="text" size="15" name="q" id="searchsite" value="Search.." onfocus="if(this.value == 'Pesquisar..') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Pesquisar..';}"/>
						<input type="submit" value="Send" class="submit" />
					</form>
				</li>
			</ul>

		<div id="headbar" style="padding-bottom:2px;">
			<ul>
				<li>			 
					 <div id = "connectbutton"> </div>			 
				</li>
			</ul>
		</div>
		<br/>
		<div id="logo"><img src = "images/democracia.gif"></img></div>
		<div id="cab">
			<ul>{%block menu%}{%endblock%}</ul>
		</div>

	<div id="navbar">
		<ul>
			<li>
				<a href = "/">Democracia 2.0 </a>
				 &#187; <a href="/publicadas">{{resource.pagename}}</a>				      	
			</li>      	
		</ul> 	
	</div>
</div><!-- header end -->
			
			<div id="content-wrap2">  
				
				<div id="contentbox" >	

{%block body%}{%endblock%}                                 										

<br /><br />
<div class="pagination"><p><span>&#171; previous</span>
	{% for pag in paginas %}
		{% if category %}
					<span><a href ="?page={{pag}}&category={{category}}" >{{pag}}</a></span>		
		{% else %}
					<span><a href ="?page={{pag}}" >{{pag}}</a></span>
		{% endif%}
	{% endfor %}
<span> next &#187;</span></p></div>
						
				</div><!-- contentbox end -->
				
		<div id="sidebar">					
				
				<div class="featurebox">
	
<div class="tlb">
	<span><a onclick="new Effect.toggle('s1','blind', {queue: 'end'});"> <img src="/images/expand.png" alt="expand" /></a></span>
	<a href="#">Category</a>
</div>

<div id="cats" style="padding-bottom:1px">
	<ul id="nav-secondary">
		<li>																
								
			<!--	<a href="/rss?category=1" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a>	-->	
									<a href="/publicadas?category=Group Fundraiser" style="padding-bottom:5px;">Group Fundraiser </a>											
								
			<!--	<a href="/rss?category=2" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a>	-->		
									<a href="/publicadas?category=Campaign " style="padding-bottom:5px;">Campaign </a>											
								
			<!--	<a href="/rss?category=3" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a>	-->		
									<a href="/publicadas?category=Pledged Action" style="padding-bottom:5px;">Pledged Action</a>											
								
			<!--	<a href="/rss?category=4" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a>	-->		
									<a href="/publicadas?category=Event" style="padding-bottom:5px;">Event</a>											
								
			<!--	<a href="/rss?category=5" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a>	-->		
									<a href="/publicadas?category=Affinity Group" style="padding-bottom:5px;">Affinity Group </a>											
								
			<!--	<a href="/rss?category=6" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a>	-->		
									<a href="/publicadas?category=Volunteer" style="padding-bottom:5px;">Volunteer</a>											
								
			<!--	<a href="/rss?category=7" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a> -->			
									<a href="/publicadas?category=Micro-credit Loan" style="padding-bottom:5px;">Micro-credit Loan</a>											
								
			<!--	<a href="/rss?category=8" target="_blank" style="border:none;"> 	 
	      <img src="/images/rss.gif" border="0" style="float:right;padding-right:10px;" alt="RSS" /></a>	-->		
									<a href="/publicadas?category=Petition" style="padding-bottom:5px;">Petition</a>

		</li>
	</ul>
</div>
</div>


<!-- Include the Google Friend Connect javascript library. -->
<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
<!-- Define the div tag where the gadget will be inserted. -->
<div id="div-1238429576013" style="width:258px;border:1px solid #cccccc;"></div>
<!-- Render the gadget into a div. -->
<script type="text/javascript">
	var skin = {};
	skin['HEIGHT'] = '385';
	skin['BORDER_COLOR'] = '#cccccc';
	skin['ENDCAP_BG_COLOR'] = '#e0ecff';
	skin['ENDCAP_TEXT_COLOR'] = '#333333';
	skin['ENDCAP_LINK_COLOR'] = '#0000cc';
	skin['ALTERNATE_BG_COLOR'] = '#ffffff';
	skin['CONTENT_BG_COLOR'] = '#ffffff';
	skin['CONTENT_LINK_COLOR'] = '#0000cc';
	skin['CONTENT_TEXT_COLOR'] = '#333333';
	skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
	skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
	skin['CONTENT_HEADLINE_COLOR'] = '#333333';
	google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
	google.friendconnect.container.renderMembersGadget(
	 { id: 'div-1238429576013',
	   site: '14765485020714539135' },
	  skin);
</script>
				</div><!-- sidebar end -->

			</div><!-- content-wrap end --> 
		       	
		</div><!-- wrap end -->

		
<br clear="all" />
<div class="footer">	
</div>

<div class="footer" style="display:none">Powered By <a href="http://www.pligg.com/">Pligg</a></div>


   <script type="text/javascript">
    var SITE_ID = '14765485020714539135';
    var viewer = false, ownerFriends, activities;
    google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
    google.friendconnect.container.loadOpenSocialApi({ 
            site: SITE_ID,
            onload: function() { init(); }
	});
			
			
	function init() {
		// Create a request to grab the current viewer.
		var req = opensocial.newDataRequest();
		req.add(req.newFetchPersonRequest('VIEWER'), 'viewer_data');
		// Sent the request
		req.send(onData);
	}

	function onData(data) {
	  // If the view_data had an error, then user is not signed in
	  if (data.get('viewer_data').hadError()) {
		var options = {
		  id: "connectbutton"
		};
		//google.friendconnect.renderSignInButton(options); 
		logout();
		var content = document.getElementById("connectbutton");
		content.innerHTML = "<a href='/'>Home</a> &nbsp;&nbsp;	<a href='#' onclick='google.friendconnect.requestSignIn()'>Sign in</a>";
	  } else {
	  
	    viewer = data.get('viewer_data').getData();		
		var content = document.getElementById("connectbutton");
		addUser(data.get('viewer_data').getData().getDisplayName(),data.get('viewer_data').getData().getId());	
		login(data.get('viewer_data').getData().getId());	
		var html = "<a href='/'>Home</a> &nbsp;&nbsp;	 <a href='#' onclick='google.friendconnect.requestSignOut()'>Sign out</a>";
		content.innerHTML = html;
	
	  }
	}	
	
	function addUser(nome,id,email){
		url = '/register?nome=' + nome + "&id=" + id + "&email=" + email;
		$.get(url, function (data){
		});
	}		
	
	function login(id){
		url = '/login?id=' + id;
		$.get(url, function (data){
		});
	}	

	function logout(){
		url = '/login?logout=' + '1';
		$.get(url, function (data){
		});	
	}
	
	function votar(proposta,count,id){
		if(viewer){
			url = '/votar?proposta=' + proposta + "&id=" + viewer.getId();
			var votes = document.getElementById("xvotes-"+id);
			$.get(url, function (data){
				if(data != "0"){ 
					vote = parseInt(votes.innerHTML);
					votes.innerHTML = vote + 1 +"";
				}
			});	
		}else{
			alert("Login to post a new action !!!");		
		}	
	}		
		
	</script>
		                   
	<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">
	try {
		var pageTracker = _gat._getTracker("UA-8212666-1");
		pageTracker._trackPageview();
	} catch(err) {}
	</script>
	
	</body>
</html>
